package com.qhit.service.impl;

import com.qhit.dao.GoodsMapper;
import com.qhit.pojo.Goods;
import com.qhit.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;
    public List<Goods> getList(HashMap hashMap) {
        return goodsMapper.getList(hashMap);
    }

    public long getListCount(HashMap hashMap) {
        return goodsMapper.getListCount(hashMap);
    }

    public int add(Goods goods) {
        return goodsMapper.add(goods);
    }

    public Goods getGoodsById(String id) {
        return goodsMapper.getGoodsById(id);

    }

    public int edit(Goods goods) {

        return goodsMapper.edit(goods);
    }

    public int del(String id) {
        return goodsMapper.del(id);
    }
}
